package edu.sysu.demo.petstore.dog.user;

import edu.sysu.demo.petstore.dog.data.entity.Role;
import org.springframework.security.core.GrantedAuthority;

class GrantedAuthorityAdapter implements GrantedAuthority {

  private static final long serialVersionUID = -8946427505376103051L;
  private final Role role;

  GrantedAuthorityAdapter(Role role) {
    this.role = role;
  }

  @Override
  public String getAuthority() {
    return role.getName();
  }
}
